Skip to content

Wix-style section picker + demo content seed + project card SVG fix#8

Merged
Aedankerr merged 5 commits intomainfrom
copilot/file-upload-storage-location
Mar 9, 2026
Merged

Wix-style section picker + demo content seed + project card SVG fix#8
Aedankerr merged 5 commits intomainfrom
copilot/file-upload-storage-location

Conversation

Copy link
Contributor

Copilot AI commented Mar 9, 2026

The section type picker was four unstyled text buttons with no visual indication of what each section looks like, and all pages were empty on a fresh install.

Section picker → Wix-style visual cards

Replaced the button strip with a 2-column grid of large preview cards. Each card renders a full-fidelity HTML mockup of the section layout scaled down via CSS transform — the same technique Wix uses internally. Hovering reveals a dark overlay with an + Add CTA.

:root { --picker-scale: 0.35; }
.picker-preview-scaled {
  transform: scale(var(--picker-scale));
  width: calc(100% / var(--picker-scale));
}
Card Preview content
Hero Indigo→purple gradient banner, headline, tagline, two CTAs
Projects Grid 3-column card grid with tech-tag pills
Timeline Left accent line, dot markers, role/company/date rows
Contact Centred icon list — email, GitHub, LinkedIn, website

Demo content seeded on first startup

All four default pages are now pre-populated on a fresh install (blockCount === 0). Content models a complete developer portfolio (Alex Rivera) across Home, Projects, CV, and Contacts. Guard ensures existing data is never overwritten.

Fix: oversized SVG icons in project cards (site.html)

w-3.5, h-3.5, w-8, h-8 were absent from the page's self-contained CSS, causing the external-link icon in "View Project" to render at full viewport width.


Home — Hero + experience timeline + contact links

Home

Projects — Hero + 6-card grid with tech tags + "View Project" links

Projects

CV — Hero + work experience + education timelines

CV

Contacts — Clean contact icon grid

Contacts


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…tom CSS

Co-authored-by: Aedankerr <56336929+Aedankerr@users.noreply.github.com>
Copilot AI changed the title [WIP] Clarify file storage location after upload Website builder pivot: inline page editor, CV profiles, custom CSS injection Mar 9, 2026
@Aedankerr
Copy link
Owner

@copilot show me the new ui preview

Copy link
Contributor Author

Copilot AI commented Mar 9, 2026

@copilot show me the new ui preview

Here's the full UI tour:

Sidebar — Pages / Site / Tools groups, "Website Builder" subtitle on the logo:
Sidebar & Home

Add Section picker — inline, no modal:
Add Section

Hero section inline editor — always expanded, visibility toggle, Save per section, remove button:
Hero editor

CV Profiles — save current CV as a named snapshot, import a JSON as a profile (file not stored on server), load/switch/set-as-default:
CV Profiles

Custom CSS — any valid CSS, injected server-side into the public CV page on every request:
Custom CSS

Copilot AI and others added 2 commits March 9, 2026 02:44
Co-authored-by: Aedankerr <56336929+Aedankerr@users.noreply.github.com>
…eviews

- Replace abstract shape picker with 2-column grid of large visual cards
- Each card shows a CSS-transform-scaled (scale(0.35)) realistic render of the actual section layout: Hero gradient banner, Projects card grid with tech tags, Timeline with dots and entries, Contact icon list
- Hover overlay reveals '+ Add' CTA button (exact Wix pattern)
- Scale factor extracted to --picker-scale CSS custom property (DRY)
- Preview outer wrappers extracted to .prev-hero/projects/timeline/contact CSS classes

Co-authored-by: Aedankerr <56336929+Aedankerr@users.noreply.github.com>
Copilot AI changed the title Website builder pivot: inline page editor, CV profiles, custom CSS injection Wix-style section picker with CSS-transform-scaled realistic previews Mar 9, 2026
…G icon sizing in project cards

- src/server.js: on fresh install (blockCount=0), seed realistic developer-portfolio
  content into all four default pages:
  · Home  — Hero + 2-item experience timeline + contact links
  · Projects — Hero + 6-project grid (Logship, FormKit Pro, PocketCV, Dispatch,
               Inkdrop Theme Pack, OSS Contributions) with tech-stack tags & links
  · CV    — Hero + 3-item work-experience timeline + 1-item education timeline
  · Contacts — Contact block (email, GitHub, LinkedIn, website)
- public-readonly/site.html: add missing w-3.5, h-3.5, w-8, h-8 CSS utility classes
  that caused the external-link SVG icon inside project cards to render at full viewport
  size instead of 0.875 rem

Co-authored-by: Aedankerr <56336929+Aedankerr@users.noreply.github.com>
Copilot AI changed the title Wix-style section picker with CSS-transform-scaled realistic previews Wix-style section picker + demo content seed + project card SVG fix Mar 9, 2026
@Aedankerr Aedankerr marked this pull request as ready for review March 9, 2026 03:05
@Aedankerr Aedankerr merged commit 2133c1b into main Mar 9, 2026
3 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04c6da9657

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +991 to +996
projects.push({
name: row.querySelector('.ipj-name')?.value || '',
link: row.querySelector('.ipj-link')?.value || '',
description: row.querySelector('.ipj-desc')?.value || '',
tech_stack: (row.querySelector('.ipj-tech')?.value || '').split(',').map(s => s.trim()).filter(Boolean),
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve project images when saving projects grid

Saving a projects_grid section now serializes each project without an image field, so any existing project images are silently dropped on the next save (even if the user only edits text). This is user-visible data loss because the public renderer relies on p.image to show project thumbnails and falls back to placeholders when the field disappears.

Useful? React with 👍 / 👎.

Comment on lines +299 to +301
// Inject custom CSS
const customCss = getCustomCss();
if (customCss) html = html.replace('</head>', `<style id="custom-css">${customCss}</style></head>`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Wire custom CSS injection into active public routes

The new custom-CSS injection is implemented inside servePublicIndex, but the public app still serves /, /projects, and /contacts via direct res.sendFile(...) handlers, so these pages never pass through this injection path. In practice, saved CSS only affects routes that use serveDatasetPage (for example /v/:slug), leaving the main public site unchanged.

Useful? React with 👍 / 👎.

Comment on lines +794 to +795
const blockCount = db.prepare('SELECT COUNT(*) as n FROM blocks').get().n;
if (blockCount === 0) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict demo seeding to first-run initialization

The startup seed runs whenever blocks is empty, not just on a fresh install. If an existing user intentionally removes all sections to keep pages blank, the next restart repopulates all default pages with demo content, unexpectedly reintroducing data they deleted.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants